<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<head>
    <meta charset="utf-8" />
    <title>祈贝健康--后台管理系统</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
    <meta content="" name="description" />
    <meta content="" name="author" />

    <!-- ================== BEGIN BASE CSS STYLE ================== -->
    <link href="./Public/Admin/assets/plugins/jquery-ui/themes/base/minified/jquery-ui.min.css" rel="stylesheet" />
    <link href="./Public/Admin/assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
    <link href="./Public/Admin/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
    <link href="./Public/Admin/assets/css/animate.min.css" rel="stylesheet" />
    <link href="./Public/Admin/assets/css/style.min.css" rel="stylesheet" />
    <link href="./Public/Admin/assets/css/style-responsive.min.css" rel="stylesheet" />
    <link href="./Public/Admin/assets/css/theme/default.css" rel="stylesheet" id="theme" />
    <!-- ================== END BASE CSS STYLE ================== -->

    <!-- ================== BEGIN PAGE LEVEL STYLE ================== -->
    <link href="./Public/Admin/assets/plugins/DataTables/css/data-table.css" rel="stylesheet" />
    <!-- ================== END PAGE LEVEL STYLE ================== -->

    <!-- ================== BEGIN BASE JS ================== -->
    <script src="./Public/Admin/assets/plugins/pace/pace.min.js"></script>
    <!-- ================== END BASE JS ================== -->
</head>
<body>
<php> include './Public/Admin/header.html'; </php>



<!-- begin #content -->
<div id="content" class="content">
    <!-- begin breadcrumb -->
    <ol class="breadcrumb pull-right">
        <li><a href="javascript:;">首页</a></li>
        <li><a href="javascript:;">商铺管理</a></li>
        <li class="active">添加商铺</li>

    </ol>
    <!-- end breadcrumb -->
    <!-- begin page-header -->
    <h1 class="page-header">商铺管理 <small>添加商铺</small></h1>
    <!-- end page-header -->

    <!-- begin row -->
    <div class="row">
        <!-- begin col-12 -->
        <div class="col-md-12">
            <!-- begin panel -->
            <div class="panel panel-inverse">
                <div class="panel-heading">
                    <div class="panel-heading-btn">
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-repeat"></i></a>
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-danger" data-click="panel-remove"><i class="fa fa-times"></i></a>
                    </div>
                    <h4 class="panel-title">添加商铺</h4>
                </div>
                <div class="panel-body">
                    <div class="table-responsive">
                        <!--表单-->

                        <div class='col-md-10'>
                            <form class='form-horizontal' role='form' method="post" action="index.php?m=Admin&c=ShopBase&a=lists&type=1" enctype="multipart/form-data">

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>商铺类别：</label>
                                    <div class='col-md-4'>
                                        <select  class='form-control' name="lib" id="lib">


                                        </select>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>商户名称：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="sid" id='sid' placeholder='请输入商户名称'>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>商铺名称：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="name" id='name' placeholder='请输入商铺名称'>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>商铺英文名称：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="en_name" id='en_name' placeholder='请输入商铺英文名称'>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>中文简介：</label>
                                    <div class='col-md-4'>
                                        <textarea class="form-control" rows='3' name="cn_abstract" id="cn_abstract"  placeholder="请输入英文文介绍"></textarea>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>输入英文简介：</label>
                                    <div class='col-md-4'>
                                        <textarea class="form-control" rows='3' name="en_abstract" id="en_abstract"  placeholder="请输入英文文介绍"></textarea>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>地址：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="addr" id='addr' placeholder='请输入商铺地址'>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>服务标准：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="standards" id='standards' placeholder='标准服务'>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>生活说明：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="life_description" id='life_description' placeholder='请输生活说明'>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>特色服务：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="characteristic" id='characteristic' placeholder='请输入特色服务'>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>免费和赠品：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="gift" id='gift' placeholder='请输生活说明'>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>不包含服务：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="not_contain" id='not_contain' placeholder='请输入不包含的服务'>
                                    </div>
                                </div>


                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>所属国家：</label>
                                    <div class='col-md-4'>
                                        <select onchange="loads()" class='form-control' name="cid" id="cid">


                                        </select>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>所属城市：</label>
                                    <div class='col-md-4'>
                                        <select class='form-control' name="zid" id="zid">


                                        </select>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>logo图：</label>
                                    <div class='col-md-4'>
                                        <input type="file" name="logo_img" id="logo_img"/>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>商铺形象图：</label>
                                    &nbsp;&nbsp;&nbsp;&nbsp;<a id="but" class="btn btn-primary" >加</a>

                                    <div id="test" class='col-md-4'>
                                        <input type="file" name="imgs[]" id="imgs"/>
                                    </div>

                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>币种：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="bz" id='bz' placeholder='请输入币种'>
                                    </div>
                                </div>



                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>是否合作：</label>
                                    <div class='col-md-2'>
                                        <input type='checkbox' class='form-control input-lg' name="is_hz" id='is_hz' value="1">如果是合作商请在此打 " √ "
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>是否最新：</label>
                                    <div class='col-md-2'>
                                        <input type='checkbox' class='form-control input-lg' name="is_new" id='is_new' value="1">如果是最新请在此打" √ "
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>平台手续费：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="pay_percentage" id='pay_percentage' placeholder='请输入平台手续费'>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>用户手续费：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="u_poundage" id='u_poundage' placeholder='请输入用户手续费'>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>联系方式：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="information" id='information' placeholder='请输入联系方式'>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>联系人姓名：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="username" id='username' placeholder='请输入联系人'>
                                    </div>
                                </div>

                                    <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>营业开始时间：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="bh_start" id='bh_start' placeholder='请输入营业开始时间'>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>营业结束时间：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="bh_stop" id='bh_stop' placeholder='请输入营业结束时间'>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>是否全日开放：</label>
                                    <div class='col-md-2'>
                                        <input type='checkbox' class='form-control input-lg' name="is_hz" id='is_bh' value="1">如果是合作商请在此打 " √ "
                                    </div>
                                </div>
                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>经度：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="lat" id='lat' placeholder='请输入经度'>
                                    </div>
                                </div>


                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>备注：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="remark" id='remark' placeholder='请输入备注'>
                                    </div>
                                </div>


                                <div class='form-group'>
                                    <div class='col-md-3 col-md-offset-2'>
                                        <button onclick="" class='btn btn-success btn-radius form-control'>提交</button>
                                    </div>
                                </div>
                            </form>
                        </div>

                    </div>
                </div>//////////
            </div>
            <!-- end panel -->
        </div>
        <!-- end col-12 -->
    </div>
    <!-- end row -->
</div>
<!-- end #content -->


<!-- begin scroll to top btn -->
<a href="javascript:;" class="btn btn-icon btn-circle btn-success btn-scroll-to-top fade" data-click="scroll-top"><i class="fa fa-angle-up"></i></a>
<!-- end scroll to top btn -->
<?php include './header.html'; ?>
<!-- end page container -->

<!-- ================== BEGIN BASE JS ================== -->
<script src="./Public/Admin/assets/plugins/jquery/jquery-1.9.1.min.js"></script>
<script src="./Public/Admin/assets/plugins/jquery/jquery-migrate-1.1.0.min.js"></script>
<script src="./Public/Admin/assets/plugins/jquery-ui/ui/minified/jquery-ui.min.js"></script>
<script src="./Public/Admin/assets/plugins/bootstrap/js/bootstrap.min.js"></script>
<!--[if lt IE 9]>
<script src="./Public/Admin/assets/crossbrowserjs/html5shiv.js"></script>
<script src="./Public/Admin/assets/crossbrowserjs/respond.min.js"></script>
<script src="./Public/Admin/assets/crossbrowserjs/excanvas.min.js"></script>
<![endif]-->
<script src="./Public/Admin/assets/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<!-- ================== END BASE JS ================== -->

<!-- ================== BEGIN PAGE LEVEL JS ================== -->
<script src="./Public/Admin/assets/plugins/DataTables/js/jquery.dataTables.js"></script>
<script src="./Public/Admin/assets/plugins/DataTables/js/dataTables.colVis.js"></script>
<script src="./Public/Admin/assets/js/apps.min.js"></script>
<!-- ================== END PAGE LEVEL JS ================== -->
<script>
    $(document).ready(function() {
        App.init();
        loadc();
        loadlib();

        window.rowCount=1;
        $("#but").click(function(){
            if(rowCount<=4){
                rowCount++;
                var newRow='<div class="col-md-4 col-md-offset-2"><input type="file" name="imgs[]" id="imgs'+rowCount+'"/></div>';
                    newRow+='<div class="col-md-2"><a class="btn btn-success" id="dele'+rowCount+'" onclick="dele('+rowCount+')" >删除</a></div>';
                $("#test").after(newRow);
            }
        });
    });

    //删除表单
    function dele(obj){
        $("#imgs"+obj).remove();
        $("#dele"+obj).remove();
        rowCount--;
    }
    //=======================================================================================================
    function loadc(){
        $.getJSON("index.php?m=Admin&c=ShopBase&a=country_list",function(result){
            var html='<option value="-1">--请选择--</option>';
            if(result!=null){
                $.each(result, function(key, val) {
                    html+='<option value="'+val.countryid+'">'+val.countryname_cn+'</option>';
                });
            }
            $("#cid").html(html);
        });
    }
    //================================================================================================
    function loads(){
        var a=$("#cid").find("option:selected").val();
        $.getJSON("index.php?m=Admin&c=ShopBase&a=city_list&cid="+a,function(result){
            var html='';
            if(result!=null){
                $.each(result, function(key, val) {
                    html+='<option value="'+val.id+'">'+val.name+'</option>';
                });
            }
            $("#zid").html(html);
        });

    }
//===========================获取商铺类别================================================
    function loadlib(){
        $.getJSON("index.php?m=Admin&c=ShopBase&a=get_shop_class",function(result){
                var html='<option value="-1">--请选择--</option>';
                if(result!=null){
                    $.each(result, function(key, val) {
                        html+='<option value="'+val.id+'">'+val.name+'</option>';
                    });
                }
                $("#lib").html(html);
        });
    }

</script>
</body>
</html>

